<?php

class Edit_info extends CI_Controller {

    function __construct() {
        parent::__construct();
        $this->load->library(array('session'));
        $this->load->helper(array('url'));

        if ($this->session->userdata("username") == FALSE) {
            redirect("applicants/openLogin/You must login first");
        }

        $this->load->model("documents_model", "", TRUE);
        $this->load->model("debts_model", "", TRUE);
        $this->load->model("letters_model", "", TRUE);
        $this->load->model("innovations_model", "", TRUE);
        $this->load->model("appointments_model", "", TRUE);
        $this->load->model("concepts_model", "", TRUE);
        $this->load->model("proposals_model", "", TRUE);
        $this->load->model("bids_model", "", TRUE);
        $this->load->model("trends_model", "", TRUE);
        $this->load->model("assets_model", "", TRUE);
        $this->load->model("opis_model", "", TRUE);
        $this->load->model("sectoral_statistics_model", "", TRUE);
        $this->load->model("partnerships_model", "", TRUE);
        $this->load->model("csr_model", "", TRUE);
        $this->load->model("trainings_model", "", TRUE);
        $this->load->model("performances_model", "", TRUE);
        $this->load->model("leave_schedule_model", "", TRUE);
        $this->load->model("r_n_d_model", "", TRUE);
        $this->load->model("opportunities_model", "", TRUE);
        $this->load->model("paid_up_members_model", "", TRUE);
    }

    function debtMoreInfo($tid, $div) {
        $query = $this->debts_model->getAll($this->session->userdata("username"), $tid);
        $data = $query[0];
        $data['div'] = $div;
        $this->load->view("mis/more_info/debtsMoreInfo", $data);
    }

    function letterEditInfo($tid, $div) {
        $query = $this->letters_model->getOne($tid);
        $data = $query[0];
        $data['div'] = $div;
        $this->load->view("mis/edit_info/lettersEditInfo", $data);
    }

    function innovationsMoreInfo($tid, $div) {
        $query = $this->innovations_model->getOne($tid);
        $data = $query[0];
        $data['div'] = $div;
        $this->load->view("mis/more_info/innovationsMoreInfo", $data);
    }

    function appointmentsMoreInfo($tid, $div) {
        $query = $this->appointments_model->getOne($tid);
        $data = $query[0];
        $data['div'] = $div;
        $this->load->view("mis/more_info/appointmentsMoreInfo", $data);
    }

    function conceptsMoreInfo($tid, $div) {
        $query = $this->concepts_model->getOne($tid);
        $data = $query[0];
        $data['div'] = $div;
        $this->load->view("mis/more_info/conceptsMoreInfo", $data);
    }

    function proposalsMoreInfo($tid, $div) {
        $query = $this->proposals_model->getOne($tid);
        $data = $query[0];
        $data['div'] = $div;
        $this->load->view("mis/more_info/proposalsMoreInfo", $data);
    }

    function bidsMoreInfo($tid, $div) {
        $query = $this->bids_model->getOne($tid);
        $data = $query[0];
        $data['div'] = $div;
        $this->load->view("mis/more_info/bidsMoreInfo", $data);
    }

    function trendsMoreInfo($tid, $div) {
        $query = $this->trends_model->getOne($tid);
        $data = $query[0];
        $data['div'] = $div;
        $this->load->view("mis/more_info/trendsMoreInfo", $data);
    }

    function assetsMoreInfo($tid, $div) {
        $query = $this->assets_model->getOne($tid);
        $data = $query[0];
        $data['div'] = $div;
        $this->load->view("mis/more_info/assetsMoreInfo", $data);
    }

    function opisMoreInfo($tid, $div) {
        $query = $this->opis_model->getOne($tid);
        $data = $query[0];
        $data['div'] = $div;
        $this->load->view("mis/more_info/opisMoreInfo", $data);
    }

    function sectoralStatisticsMoreInfo($tid, $div) {
        $query = $this->sectoral_statistics_model->getOne($tid);
        $data = $query[0];
        $data['div'] = $div;
        $this->load->view("mis/more_info/sectoralStatisticsMoreInfo", $data);
    }

    function partnershipsMoreInfo($tid, $div) {
        $query = $this->partnerships_model->getOne($tid);
        $data = $query[0];
        $data['div'] = $div;
        $this->load->view("mis/more_info/partnershipsMoreInfo", $data);
    }

    function csrsMoreInfo($tid, $div) {
        $query = $this->csr_model->getOne($tid);
        $data = $query[0];
        $data['div'] = $div;
        $this->load->view("mis/more_info/csrsMoreInfo", $data);
    }

    function performancesMoreInfo($tid, $div) {
        $query = $this->performances_model->getOne($tid);
        $data = $query[0];
        $data['div'] = $div;
        $this->load->view("mis/more_info/performancesMoreInfo", $data);
    }

    function trainingMoreInfo($tid, $div) {
        $query = $this->trainings_model->getOne($tid);
        $data = $query[0];
        $data['div'] = $div;
        $this->load->view("mis/more_info/trainingMoreInfo", $data);
    }

    function LeaveScheduleMoreInfo($tid, $div) {
        $query = $this->leave_schedule_model->getOne($tid);
        $data = $query[0];
        $data['div'] = $div;
        $this->load->view("mis/more_info/leaveScheduleMoreInfo", $data);
    }

    function r_n_dMoreInfo($tid, $div) {
        $query = $this->r_n_d_model->getOne($tid);
        $data = $query[0];
        $data['div'] = $div;
        $this->load->view("mis/more_info/r_n_dMoreInfo", $data);
    }

    function opportunitiesMoreInfo($tid, $div) {
        $query = $this->opportunities_model->getOne($tid);
        $data = $query[0];
        $data['div'] = $div;
        $this->load->view("mis/more_info/opportunitiesMoreInfo", $data);
    }


    function paidUpMembersMoreInfo($tid, $div) {
        $query = $this->paid_up_members_model->getOne($tid);
        $data = $query[0];
        $data['div'] = $div;
        $this->load->view("mis/more_info/paidUpMembersMoreInfo", $data);
    }

}

?>
